package com.hyq.learn.security.cipher;

/**
 * @author : heyuqin
 * @since : 2024/03/05 17:37
 */
public interface CipherAlgorithm {

    /**
     * 加密
     * @param data
     * @param key
     * @return
     * @throws Exception
     */
    byte[] encryption(byte[] data, CipherKey key) throws Exception;

    /**
     * 解密
     * @param data
     * @param key
     * @return
     * @throws Exception
     */
    byte[] decryption(byte[] data, CipherKey key) throws Exception;
}
